package Data::Semantic::URI::http_TEST;

use strict;
use warnings;
use Test::More;
use Test::Differences;


our $VERSION = '0.01';


use base qw(
    Data::Semantic::Test
    Data::Semantic::URI::TestData::http
);


use constant PLAN => 2;


sub run {
    my $self = shift;
    $self->SUPER::run(@_);

    my $obj = $self->make_real_object(keep => 1);
    my $uri = 'http://use.perl.org:8081/~hanekomu/journal?entry=12345';

    ok($obj->is_valid($uri), "$uri is valid");

    my %expect = (
      abspath_full          => '/~hanekomu/journal?entry=12345',
      URI                   => $uri,
      abspath_no_query      => '~hanekomu/journal',
      query                 => 'entry=12345',
      abspath_full_no_slash => '~hanekomu/journal?entry=12345',
      scheme                => 'http',
      port                  => '8081',
      host                  => 'use.perl.org'
    );

    eq_or_diff({ $obj->kept }, \%expect, 'kept values');
}


1;


__END__

{% PROCESS complete/semantic_companion %}
